# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=ubridge
pkgver=0.9.18
pkgrel=1
pkgdesc="Bridge for UDP tunnels, Ethernet, TAP and VMnet interfaces."
url="https://github.com/GNS3/ubridge"
arch="all"
license="GPL-3.0-or-later"
makedepends="libpcap-dev linux-headers"
install="$pkgname.post-install $pkgname.post-upgrade"
source="$pkgname-$pkgver.tar.gz::https://github.com/GNS3/ubridge/archive/v$pkgver.tar.gz
	musl-fixes.patch"

build() {
	make
}

check() {
	# This normally wouldn't be accepted but this is literally how upstream
	# CI does it
	./ubridge -v
}

package() {
	install -Dm755 ubridge -t "$pkgdir"/usr/bin
}

sha512sums="f2c9e9d0242f61363a3f4ce6f1acf4013245ff0854a7f64c96d6b8737bd3cc505a38aaf43a0928e2a5a88bcd39f786e00fab68748ad56770d18d713005750c60  ubridge-0.9.18.tar.gz
6922022e18e85ee7d2cb244ebde8beee307a216953da804cc495d691980818f0401528157a8b14cfed0fb85bab2b18c78f230d4b94941de47861bd40eaccd3a3  musl-fixes.patch"
